package com.spic.business.accident.instant.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.spic.business.common.core.workflow.WorkFlowEntity;
import com.spic.common.core.annotation.Excel;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 事故即时报告对象 accident_instant_report
 *
 * @author spic
 * @date 2021-11-30
 */
@Data
public class AccidentInstantReport extends WorkFlowEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 报告类型
     */
    @Excel(name = "报告类型")
    private String reportType;

    /**
     * 第一次报告时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @Excel(name = "第一次报告时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date firstReportTime;

    @Excel(name = "事故名称")
    private String name;

    @Excel(name = "报告发生部门")
    private Long happendDeptId;

    /**
     * 发生时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date happenTime;

    /**
     * 地点（区域）
     */
    @Excel(name = "地点", readConverterExp = "区=域")
    private String happenPlace;

    /**
     * 事故（事件）类型
     */
    @Excel(name = "事故", readConverterExp = "事=件")
    private String type;

    /**
     * 简要经过
     */
    @Excel(name = "简要经过")
    private String brief;

    /**
     * 初判事故等级
     */
    @Excel(name = "初判事故等级")
    private String initialLevel;

    /**
     * 死亡人数
     */
    @Excel(name = "死亡人数")
    private Integer deathNumber;

    /**
     * 失踪人数
     */
    @Excel(name = "失踪人数")
    private Integer missingNumber;

    /**
     * 重伤人数
     */
    @Excel(name = "重伤人数")
    private Integer seriousInjuryNumber;

    /**
     * 电力设备、设施损坏情况
     */
    @Excel(name = "电力设备、设施损坏情况")
    private String equipmentTrouble;

    /**
     * 原因初步判断
     */
    @Excel(name = "原因初步判断")
    private String initialCause;

    /**
     * 采取措施
     */
    @Excel(name = "采取措施")
    private String measures;

    /**
     * 填报部门
     */
    @Excel(name = "填报部门")
    private Long deptId;

    /**
     * 填报部门及其下属部门
     */
    @TableField(exist = false)
    private List<Long> deptIds;

    /**
     * 填报人联系方式
     */
    private String creatorPhone;

    /**
     * 实列id
     */
    private String instanceId;

    private String accidentShift;//事故班次

    private Long shiftForeman;//当班工长

    private Long dutyDirector;    //值班主任

    private String dutyDispatcher;//值班调度

    private Long reporter;//汇报人

    private Long receiver;//接报人

    @TableField(exist = false)
    private List<AccidentInstantReportPartySubtable> accidentInstantReportPartySubtableList;

    private String dirtyReason;

}
